1. Field of the Invention
The present invention relates to a technique for measuring a position and orientation of an object whose three-dimensional shape has already been known.
2. Description of the Related Art
In production sites, robotic automation has been introduced to improve production efficiency. In robotic assembly work, a target object needs to be recognized to acquire an accurate position and orientation. As a method for implementing such operations, a method using a grayscale image and a distance image obtained by capturing the target object has been developed. Noises generated due to various factors are mixed in the grayscale image and the distance image. Therefore, a method having high robustness to the noises is desired.
For example, a method for measuring a position and orientation of a camera using a model fitting method for fitting measurement data obtained from a grayscale image and a distance image obtained by capturing a target object into a shape model has been known. A specific example is a method for giving an approximate position and orientation of a target object and optimizing the position and orientation so that an edge extracted from the grayscale image and a distance value obtained from the distance image are more correctly fitted into a shape model. As means for making the measurement of the position and orientation of the camera robust, a method of generating a plurality of approximate positions and orientations at predetermined sampling intervals in a range that the position and orientation of the camera can take, performing repeated calculation for the fitting at each of the approximate positions and orientations, and setting a best fitting result as a final fitting result has been known.
A method for making a shadow existing in the grayscale image and the distance image obtained by capturing the target object robust, a method of performing processing not to erroneously associate, after estimating information about a shadow area of a target object in an acquired image, with a false contour in the shadow area has been proposed. In Japanese Patent Application Laid-Open No. 2012-42396, after an area where a distance value in a distance image includes a deficit is determined as a shadow area, different weighting factors are used depending on whether points to be associated with each other exist in the shadow area during optimization calculation for fitting.
A method discussed in Japanese Patent Application Laid-Open No. 2012-42396 premises a case where a portion where a shadow is generated is definitely reflected as a deficit portion in the distance image, and cannot cope with a shadow having a distance value in the distance image due to an effect such as secondary reflected light.